home *** CD-ROM | disk | FTP | other *** search
- // WELCOME.L - Introductory Liana Program.
-
- main
- {
- w = new window ("Welcome to Liana");
- w.menu = new menu
- << new menuitem ("&Modify...")
- << new helpmenu;
- d = new modify_dialog;
- d.skill = "novice";
- d.impressed = true;
- w.show;
- }
-
- paint
- {
- w << "Name: "+d.name+"\nSkill: "+d.skill+"\n"
- << "Is "+(d.impressed ? "" : "not ")+"impressed";
- }
-
- modify {if (d.show) w.refresh;}
-
- /* The "Modify" dialog. */
- class modify_dialog: dialog {
- public:
- string name, skill;
- bool impressed;
-
- modify_dialog
- {
- dialog ("Modify");
- this << new labeltext ("Name:")
- << new edittext (20, "name");
- this [0].under;
- south ();
- this << new groupbox ("Skill")
- << new radiobutton ("&Novice")
- << new radiobutton ("&Intermediate")
- << new radiobutton ("&Expert")
- << new endgroupbox;
- this << new checkbox ("&Impressed");
- east ();
- this << new ok_button << new cancel_button;
- }
-
- };
-